現在の位置: ホーム> 関数カテゴリ一覧> date_offset_get

date_offset_get

DateTime :: GetOffsetのエイリアス - タイムゾーンオフセットを返します
名前:date_offset_get
カテゴリ:日時
対応言語:php
一言説明:タイムゾーンオフセットを返します。

定義と使用法

date_offset_get()関数は、タイムゾーンオフセットを返します。

UTCと比較して、ニューヨークの冬と夏のタイムゾーンオフセットを数秒で返します。

 <?php
$ winter = date_create ( "2016-10-15" 、 timezone_open ( "America/new_york" ) ) ;
$ summer = date_create ( "2016-01-28" 、 timezone_open ( "America/new_york" ) ) ;

エコーdate_offset_get ( $ winter ) 。 「秒。<br />」 ;
エコーdate_offset_get ( $ summer ) 。 " 2番。" ;
?>

自分で試してみてください

文法

date_offset_get ( object ) ;
パラメーター 説明する
物体 必須。 date_create()によって返されるDateTimeオブジェクトを指定します。
類似の関数
  • 現在の時間を取得します(分、秒、マイクロ秒) gettimeofday

    gettimeofday

    現在の時間を取得します(分、秒、マイクロ
  • 現在のUNIXタイムスタンプとマイクロ秒数を返します microtime

    microtime

    現在のUNIXタイムスタンプとマイクロ秒
  • 現地時間を取得します localtime

    localtime

    現地時間を取得します
  • DateTime ::変更のエイリアス - 日付と時刻のオブジェクトの値を変更する date_modify

    date_modify

    DateTime::変更のエイリアス-日
  • 日付のUNIXタイムスタンプを入手してください mktime

    mktime

    日付のUNIXタイムスタンプを入手してく
  • DateTimeZone :: GetLocationのエイリアス - タイムゾーンに関連する位置情報を返します timezone_location_get

    timezone_location_get

    DateTimeZone::GetLoc
  • DateTime :: Settime Alias -DateTimeオブジェクトの時間を設定する date_time_set

    date_time_set

    DateTime::SettimeAli
  • DateTime :: __コンストラクトエイリアス - 新しいDateTimeオブジェクトを返します date_create

    date_create

    DateTime::__コンストラクトエ
人気記事(にんききじ)